﻿using System.Net;
using System.Net.Browser;
using System.Windows.Controls;
using System.Windows.Navigation;
using QuailDashboard.View.Views;

namespace QuailDashboard.View
{
    /// <summary>
    /// The main page of the quail dashboard site
    /// </summary>
    public partial class MainPage
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="MainPage"/> class.
        /// </summary>
        public MainPage()
        {
            InitializeComponent();
        }

        // If an error occurs during navigation, show an error window
        private void ContentFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
        {
            e.Handled = true;
            ChildWindow errorWin = new ErrorWindow(e.Uri);
            errorWin.Show();
        }
    }
}